package com.google.gwt.sample.dynatablerf.shared;

import java.util.List;

import com.google.gwt.sample.dynatablerf.server.MaterialProjetoService;
import com.google.gwt.sample.dynatablerf.server.MaterialProjetoServiceLocator;
import com.google.gwt.sample.dynatablerf.server.ProjetoService;
import com.google.gwt.sample.dynatablerf.server.ProjetoServiceLocator;
import com.google.gwt.sample.dynatablerf.server.ServicoProjetoService;
import com.google.gwt.sample.dynatablerf.server.ServicoProjetoServiceLocator;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.Service;

public interface GrifoRequestFactory extends RequestFactory {

	@Service(value = ProjetoService.class, locator = ProjetoServiceLocator.class)
	public interface ProjetoRequest extends RequestContext {
		Request<List<ProjetoProxy>> findAll(int startIndex, int maxResult);

		Request<Long> countAll();
		
		Request<List<ProjetoProxy>> findAll(String suggestion, int maxResult);
	}

	@Service(value = MaterialProjetoService.class, locator = MaterialProjetoServiceLocator.class)
	public interface MaterialProjetoRequest extends RequestContext {
		Request<List<MaterialProjetoProxy>> findAll(
				MaterialProjetoQueryParamsProxy materialProjetoQueryParams,
				int startIndex, int maxResult);

		Request<Long> count(
				MaterialProjetoQueryParamsProxy materialProjetoQueryParamsProxy);
		
		Request<List<MaterialProjetoProxy>> findAll(String suggestion, MaterialProjetoQueryParamsProxy params, int maxResult);
	}

	@Service(value = ServicoProjetoService.class, locator = ServicoProjetoServiceLocator.class)
	public interface ServicoProjetoRequest extends RequestContext {
		Request<List<ServicoProjetoProxy>> findAll(
				ServicoProjetoQueryParamsProxy servicoProjetoQueryParams,
				int startIndex, int maxResult);

		Request<Long> count(
				ServicoProjetoQueryParamsProxy servicoProjetoQueryParamsProxy);
		
		Request<List<ServicoProjetoProxy>> findAll(String suggestion, ServicoProjetoQueryParamsProxy params, int maxResult);
	}

	ProjetoRequest projetoRequest();

	MaterialProjetoRequest materialProjetoRequest();

	ServicoProjetoRequest servicoProjetoRequest();
}
